<template>
    <div class="group">
        <h2>sd1的中嵌套路由的子组件 detail1</h2>
        <p style="background-color: cornflowerblue">命名视图detail1:{{ props.id }}</p>
    </div>
</template>

<script setup lang='ts'>

import { useRoute } from 'vue-router'

const route = useRoute()
const props = defineProps(['id'])
console.log(route.params, 'route.params 1')   // 打印 params 参数
console.log(route.query, 'route.query 1')     // 打印 query 参数

</script>

<style lang="scss" scoped>
.group {
    margin: 10px;
    padding: 10px;
    border: 3px solid pink;
}
</style>